<!Doctype html>  
<html lang="en">  
	<head>  
	<meta charset="UTF-8">  
		<title>窗口位置获取</title>  
	</head>  
	<body>  
	<!-- 移动窗口，会有数值的变化 -->
		<div id='myDiv'></div>
		<script>
			var timer = setInterval(function(){
				myDiv.innerHTML = 'left:' + window.screenLeft + ';top:' + window.screenTop;
			})
			myDiv.onclick = function(){
				clearInterval(timer);
			}
		</script>
	</body>  
</html> 